<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>合同列表--合同详情</title>
    <link rel="icon" href="favicon.ico" type="images/ico">
    <meta name="author" content="dc">
    <link rel="stylesheet" type="text/css" href="/css/materialdesignicons.min.css">
    <link rel="stylesheet" type="text/css" href="/css/bootstrap.min.css">
    <link rel="stylesheet" type="text/css" href="/css/animate.min.css">
    <link rel="stylesheet" type="text/css" href="/css/style.min.css">
    <link href="/js/bootstrap-table/bootstrap-table.min.css" rel="stylesheet"/>
    <link rel="stylesheet" href="/js/jquery-confirm/jquery-confirm.min.css"/>
    <link rel="stylesheet" href="/css/skin.css"/>
    <!--固定table列-->
    <link href="/js/bootstrap-table/extensions/fixed-columns/bootstrap-table-fixed-columns.min.css" rel="stylesheet"/>
    <link rel="stylesheet" href="/css/contractManager/user/contractDetail.css"/>
    <script th:inline="javascript">
        var customerContract = [[${customerContract}]];

    </script>
</head>
<body>
<div class="outerSphereBox">
    <div class="outerSphere">
        <div class="titleValue">
            <h1>合同详情</h1>
        </div>
    </div>
    <div class="titContant">
        <!--订单主键-->
        <input type="hidden" th:value="${customerContract?.productOrderId?:''}" id="productOrderId" name="productOrderId">
        <!--合同主键-->
        <input type="hidden" th:value="${customerContract?.contractId?:''}" id="contractId" name="contractId">
        <table>
            <tr>
                <td>合同编号：<span class="text" th:text="${customerContract?.contractNumber?:''}"></span></td>
                <td>订单编号：
                    <a class="js-create-tab" data-title="订单详情" th:if="${not #strings.isEmpty(customerContract.orderNumber)}" th:attr="data-url=@{'/front/orderManager/orderDetail?productOrderId='+ ${customerContract.orderId} + '&contractId=' + ${customerContract.contractId}}">
                        <span class="text" th:text="${customerContract?.orderNumber?:''}"></span>
                    </a>
                </td>
                <td>创建人：<span class="text" th:text="${customerContract?.createPeopleName?:''}"></span></td>
            </tr>
            <tr>
                <td>所属分公司：<span class="text" th:text="${customerContract?.companyName?:''}"></span></td>
                <td>创建时间：<span class="text" th:text="${#dates.format(customerContract?.createTm, 'yyyy-MM-dd HH:mm')}"></span></td>
                <td>
                    合同状态：
                    <span class="text" th:switch="${customerContract?.contractStatus?:''}">
                        <span th:case="1">未生效</span>
                        <span th:case="2">生效中</span>
                        <span th:case="3">已结束</span>
                        <span th:case="4">已作废</span>
                        <span th:case="5">意外终止</span>
                    </span>
                </td>
            </tr>
        </table>
    </div>
    <br />
    <div class="subheading">
        <p>基本信息</p>
        <div class="centerContantTwo">
            <table>
                <tr>
                    <td>
                        合同类型：
                        <span class="text" th:switch="${customerContract?.contractType?:''}">
                            <span th:case="1">非会员合同</span>
                            <span th:case="2">会员新单合同</span>
                            <span th:case="3">活动合同</span>
                            <span th:case="4">会员续费合同</span>
                            <span th:case="5">兑换合同</span>
                            <span th:case="6">单品合同</span>
                            <span th:case="7">会员单次合同</span>
                        </span>
                    </td>
                    <td>客户名称：<span class="text" th:text="${customerContract?.customerName?:''}"></span></td>
                    <td>客户联系人：<span class="text" th:text="${customerContract?.contactName?:''}"></span></td>
                </tr>
                <tr>
                    <td>联系方式：
                        <span>
                            <span class="text off-outline-text" th:text="${customerContract?.contactDetails?:''}"></span><!-- <span class="mdi mdi-eye-off-outline outline-text"></span>-->
                        </span>
                        <!--<span style="display: none">
                            <span class="text to-outline-text" th:text="${customerContract?.contactDetails?:''}"></span> <span class="mdi mdi-eye-outline outline-text"></span>
                        </span>-->

                    </td>
                    <td>客户邮箱：<span class="text" th:text="${customerContract?.customerEmail?:''}"></span></td>
                    <td>会员主合同：
                        <a class="js-create-tab" data-title="主合同信息" th:if="${not #strings.isEmpty(customerContract.masterMembershipContract)}" th:attr="data-url=@{'/front/contractManager/contractDetail?contractId='+ ${customerContract.masterMembershipContract}}">查看
                        </a>
                    </td>
                </tr>
                <tr>
                    <td>
                        合同起止日期：
                        <span class="text" th:text="${#dates.format(customerContract?.contractStartDate, 'yyyy-MM-dd')}"></span>至
                        <span class="text" th:text="${#dates.format(customerContract?.contractEndDate, 'yyyy-MM-dd')}"></span>
                    </td>
                    <td>回款日期：<span class="text" th:text="${#dates.format(customerContract?.payBackDate, 'yyyy-MM-dd')}"></span></td>
                </tr>
                <tr>
                    <td>付款账号：<span class="text" th:text="${customerContract?.paymentAccount?:''}"></span></td>
                    <td>
                        支付方式：
                        <span class="text" th:switch="${customerContract?.paymentMethod?:''}">
                            <span th:case="2">线下支付</span>
                            <span th:case="3">余额支付</span>
                            <span th:case="4">转入额支付</span>
                            <span th:case="5">余额+转入额支付</span>
                        </span>
                    </td>
                    <td>关联跟进记录：
                        <a class="js-create-tab" data-title="跟进详情" th:if="${not #strings.isEmpty(customerContract.followRecordId)}" th:attr="data-url=@{'/front/customerManager/customerFollowRecordDetail?clueFollowId='+ ${customerContract.followRecordId}}">查看
                        </a>
                    </td>
                </tr>
                <tr>
                    <td>
                        关联赢单商机：
                        <a class="js-create-tab" data-title="商机详情" th:if="${not #strings.isEmpty(customerContract.opportunityId)}" th:attr="data-url=@{'/front/opportunityManager/opportunityDetail?opportunityId='+ ${customerContract.opportunityId}}">查看
                        </a>
                    </td>
                    <td>
                        合作开发人员：
                        <span th:each="coDeveloper : ${customerContract?.coDeveloperList}">
                            <a class="js-create-tab" data-title="人员信息" th:if="${not #strings.isEmpty(coDeveloper)}" th:attr="data-url=@{'/front/user/userInfo?userId='+ ${coDeveloper}}" >查看
                            </a>
                        </span>
                    </td>
                    <td>
                        审核是否加盖公章：
                        <span class="text" th:switch="${customerContract?.applyElectronicContract?:''}">
                            <span th:case="1">是</span>
                            <span th:case="0">否</span>
                        </span>
                    </td>
                </tr>
                <tr>
                    <td>
                        是否保密：
                        <span class="text" th:switch="${customerContract?.whetherKeepSecret?:''}">
                            <span th:case="1">是</span>
                            <span th:case="0">否</span>
                        </span>
                    </td>
                    <td>
                        提前/延期原因：
                        <span class="text" th:text="${customerContract?.advancePostponementReason?:''}"></span>
                    </td>
                </tr>
            </table>
        </div>
    </div>
    <br />
    <div class="subheading">
        <p>合同金额</p>
        <div class="centerContant centerContantMoney">
            <div><span class="after-content blueColor">合同总金额</span><span class="text AmountData " th:text="${customerContract?.contractTotalAmount?:''}"></span></div>
            <div><span class="after-content yellowColor">合同优惠总金额</span> <span class="text AmountData " th:text="${customerContract?.contractDiscountTotalAmount?:''}"></span></div>
            <div><span class="after-content greenColor">合同实际总金额</span><span class="text AmountData " th:text="${customerContract?.contractActualTotalAmount?:''}"></span></div>
            <div><span class="after-content redColor">应收款</span><span class="text AmountData " th:text="${customerContract?.contractReceivables?:''}"></span></div>
        </div>
    </div>
    <br />
    <div class="subheading">
        <p>回款情况</p>
        <div style="background: #FFFFFF;margin: 20px 20px 0 20px">
            <table id="paymentSituationTable"></table>
        </div>
        <div class="titleTherr">
            <span>总计应回款：<span class="text" th:text="${financeProductOderInfo?.orderActualTotalAmount?:''}"></span></span>
            <span>目前回款：<span class="text" th:text="${financeProductOderInfo?.returnMoneyAmount?:''}"></span></span>
            <span>尾款：<span class="text" th:text="${financeProductOderInfo?.residueMoneyAmount?:''}"></span></span>
        </div>
    </div>
    <br />
    <div class="subheading">
        <p>审核状态</p>
        <div class="centerContant centerContantStatus">
            <div>状态： <span class="text" th:switch="${customerContract?.contractReviewStatus?:''}">
                            <span th:case="0">未审核</span>
                            <span th:case="1">审核中</span>
                            <span th:case="2">审核通过</span>
                            <span th:case="3">审核失败</span>
                            <span th:case="4">审核通过并盖章</span>
                        </span>
            </div>
            <div>处理结果：<span class="text" th:switch="${contractReview?.processResult?:''}">
                            <span th:case="1">补充材料</span>
                            <span th:case="2">审核通过</span>
                            <span th:case="3">审核未通过</span>
                            <span th:case="4">审核通过并盖章</span>
                         </span>
            </div>
            <div>审核人：<span class="text" th:text="${contractReview?.createPeopleName?:''}"></span></div>
            <div>审核时间：<span class="text" th:text="${#dates.format(contractReview?.createTm, 'yyyy-MM-dd')}"></span></div>
            <div>审核备注：<span class="text" th:text="${contractReview?.contractReviewNotes?:''}"></span></div>
            <div class="file-group" th:if="${showFlag}">
                <h5 class="label-required">补充材料</h5>
                <!--<input type="file" id="file" class="hidden" />
                <input type="hidden" id="contractPic" class="image-id">
                <div class="img-box"></div>
                <button class="btn btn-default file-browser" type="button">选择补充材料</button>-->
                <div class="file-box">
                    <input type="file" id="file" class="hidden" />
                    <label for="file" class="form-control" id="fileLabel">选择补充材料</label>
                    <button class="btn btn-primary" type="button" onclick="uploadReplenishAnnex()">提交</button>
                </div>
            </div>
        </div>
    </div>
</div>
<div style="height: 15px"></div>
</body>
<script type="text/javascript" src="/js/jquery.min.js"></script>
<script type="text/javascript" src="/js/bootstrap.min.js"></script>
<script type="text/javascript" src="/js/perfect-scrollbar.min.js"></script>
<script type="text/javascript" src="/js/main.min.js"></script>
<script type="text/javascript" src="/js/bootstrap-table/bootstrap-table.min.js"></script>
<script type="text/javascript" src="/js/bootstrap-table/bootstrap-table-zh-CN.min.js"></script>
<script type="text/javascript" src="/js/popper.min.js"></script>
<script type="text/javascript" src="/js/jquery.cookie.min.js"></script>
<!-- 拖动 -->
<script src="/js/bootstrap-table/extensions/resizable/bootstrap-table-resizable.min.js"></script>
<script src="/js/crm/common/colResizable-1.6.min.js"></script>
<!-- 图片上传插件 -->
<script type="text/javascript" src="/js/upload.img.js"></script>

<!--table固定列-->
<script type="text/javascript" src="/js/bootstrap-table/extensions/fixed-columns/bootstrap-table-fixed-columns.js"></script>
<script src="/js/jquery-confirm/jquery-confirm.min.js"></script>
<script type="text/javascript" src="/js/crm/contractManager/contractDetailAdmin.js"></script>
</html>